const express = require('express');
const adminModel = require('../db/model/admin')
const route = express.Router();
route.get('/adminList',async(req,res)=>{
  try{
    const findResult = await adminModel.find({});
    // console.log(findResult);
    res.send({
        code:10000,
        msg:'查询管理员列表成功',
        data:findResult
    })
  }catch(e){
    console.log('查询管理员列表异常',e.message);
    res.send({
        code:10001,
        msg:'查询管理员列表异常'+e.message,
        data:null
    })
  }

})

module.exports = route;